package PBMessage

const (
	PBID_CS_Login = 1 
    PBID_SC_Login = 2 
    PBID_CS_RegAccount = 3 
    PBID_SC_RegAccount = 4 
    PBID_SC_HallTick = 5 
    PBID_CS_HallTick = 6 
    PBID_CS_MatchGame = 7 
    PBID_SC_RetMatchGame = 8 
    PBID_CS_CancelMatch = 9 
    PBID_SC_RetCancelMatch = 10 
    PBID_ReadRoomPlayer = 11 
    PBID_SC_EnterReadyRoom = 12 
    PBID_CS_SyncReadyPlayerState = 13 
    PBID_SC_SyncReadyRoomState = 14 
    PBID_SC_BackReadyRoomToHall = 15 
    PBID_SC_EnterGameScene = 16 
    PBID_CS_EnterGameSceneOK = 17 
    PBID_CS_GameSceneTick = 18 
    PBID_CS_BackToHall = 19 
    PBID_SC_GameEndBackHall = 20 
    PBID_SC_CreateUnits = 21 
    PBID_SC_ServerUpdate = 22 
    PBID_CS_AbilityEvent = 23 
    PBID_SC_AbilityEvent = 24 
    PBID_SC_SyncUnit = 25 
    PBID_SC_CallUnitEvent = 26 
    PBID_SC_CallTriggerEvent = 27 
    PBID_SC_BehaviorOperation = 28 
    
)

var id2Server map[uint16]int

func init() {
	id2Server = make(map[uint16]int)
	id2Server[PBID_CS_Login] = 0
id2Server[PBID_SC_Login] = 0
id2Server[PBID_CS_RegAccount] = 0
id2Server[PBID_SC_RegAccount] = 0
id2Server[PBID_SC_HallTick] = 0
id2Server[PBID_CS_HallTick] = 0
id2Server[PBID_CS_MatchGame] = 0
id2Server[PBID_SC_RetMatchGame] = 0
id2Server[PBID_CS_CancelMatch] = 0
id2Server[PBID_SC_RetCancelMatch] = 0
id2Server[PBID_ReadRoomPlayer] = 0
id2Server[PBID_SC_EnterReadyRoom] = 0
id2Server[PBID_CS_SyncReadyPlayerState] = 0
id2Server[PBID_SC_SyncReadyRoomState] = 0
id2Server[PBID_SC_BackReadyRoomToHall] = 0
id2Server[PBID_SC_EnterGameScene] = 0
id2Server[PBID_CS_EnterGameSceneOK] = 1
id2Server[PBID_CS_GameSceneTick] = 1
id2Server[PBID_CS_BackToHall] = 1
id2Server[PBID_SC_GameEndBackHall] = 1
id2Server[PBID_SC_CreateUnits] = 1
id2Server[PBID_SC_ServerUpdate] = 1
id2Server[PBID_CS_AbilityEvent] = 1
id2Server[PBID_SC_AbilityEvent] = 1
id2Server[PBID_SC_SyncUnit] = 1
id2Server[PBID_SC_CallUnitEvent] = 1
id2Server[PBID_SC_CallTriggerEvent] = 1
id2Server[PBID_SC_BehaviorOperation] = 1

}

func GetServerID(msgId uint16) int {
	return id2Server[msgId]
}
